import React, { useState } from 'react';
import { Row, Col } from 'antd';
import { useHistory,withRouter,useLocation} from 'react-router-dom';

import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
import head from "./components/css/detailmore.module.css";
import HeadNav from "./components/headNav.jsx"
import Map from "./components/map.jsx"
import Leftcon from "./components/leftConent.jsx"
import Footer from "../../components/buttom"
function Index() {
    const [didian, setDidian] = useState("上海市虹桥国际机场")

    const fn = (n:any) => {    
        setDidian(n)
    }
    interface key{
        keyCode:string
    }
    interface con{
        state:key
    }
    const localtion:con=useLocation();
    const cansu=localtion.state.keyCode
   //  console.log(cansu);
    return (
        <div>
            <div>
                <Row className={head.head1}>
                    <Col span={24}>
                        <div>
                            <HeadNav fn={fn} cityname={cansu}/>
                        </div>

                    </Col>
                </Row>
            </div>
            <div className={head.bigContent}>
                <div className={head.leftContent}>
                    <Leftcon  cityname={cansu}></Leftcon>
                </div>
                <div className={head.rightContent}>
                    <Map dd={didian}></Map>
                </div>
            </div>
        </div>
    );
}

export default Index;

